home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4446 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. Path: axl.dialup.fu-berlin.DE!not-for-mail
  2. From: axl@zedat.fu-berlin.de (Axel Thimm)
  3. Newsgroups: comp.lang.c,comp.lang.c++,gnu.gcc.help,gnu.g++.help,comp.os.msdos.djgpp
  4. Subject: Re: float != float and floats as return types
  5. Date: Tue, 30 Jan 1996 13:19:40 GMT
  6. Organization: FU Berlin
  7. Message-ID: <4el5qt$j5j@fu-berlin.de>
  8. References: <4ej9lb$mpc@fu-berlin.de>
  9. Reply-To: axl@zedat.fu-berlin.de
  10. NNTP-Posting-Host: axl.dialup.fu-berlin.de (160.45.218.93)
  11. X-Access: 16 17 19
  12. X-Newsreader: Forte Free Agent 1.0.82
  13.  
  14. Many thanks to all who have answered,
  15. I have received lots of mail about this.
  16. The problem is that gcc sometimes uses the coprocessor registers/stack
  17. to store floating point values. This is done in long double precision
  18. for i386. This should also happen with 68000 processors. This can be
  19. turned off in gcc with the following switch, which is rather
  20. self-explaining.
  21.  
  22. -ffloat-store
  23.       Do not store floating point variables in registers.
  24.       This  prevents  undesirable excess precision on ma-
  25.       chines such as the 68000 where the floating  regis-
  26.       ters (of the 68881) keep more precision than a dou-
  27.       ble is supposed to have.
  28.  
  29.       For most programs, the excess precision  does  only
  30.       good,  but a few programs rely on the precise defi-
  31.       nition of IEEE floating point.  Use `-ffloat-store'
  32.       for such programs.
  33.  
  34. ===
  35. Axel Thimm <axl@zedat.fu-berlin.de>
  36. Freie Universitaet Berlin
  37. ===
  38.  
  39.